var dbPath = require('../config/config').DbPath;
// var dbPath =  process.env.MONGOLAB_URI;
var mongoose = require('mongoose');
var i18n = require('../utility/i18n');
// use custom mongodb url or localhost
mongoose.connect(dbPath );
var db = mongoose.connection;
db.on('error', function (err) {
    console.error(i18n.__('error.db_1') + err);
    process.exit(1);
});
exports.mongoose = mongoose;


